<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%><!DOCTYPE HTML>
<%-- <%@include file="edit.jsp"%> --%>
<html>
<head>
<script type="text/javascript">
	$(function(){
		$('#toolbar').toolbar({buttons:[
			{name:'save',iconCls:'icon-save',text:'保存'}
	  	],handler:handler});
		//标签
		$('#comb_pid').combotreegrid({
       		width:'100%',
        	url:'treeModel',
        	method:'post',
        	idField:'id',
        	treeField:'tagName',
        	fitColumns:true,
        	panelHeight:100,
        	columns:[[
            	{field:'tagName',title:'名称'},
        		{field:'tagType',title:'类型',align:'center',formatter:function(v,r,i){
        			var type = "标签";
        			if(r.tagType =="1"){
        				type = "栏目";
        			}
        			return type;
        		}},
        		{field:'tagNote',title:'备注 '},
        		{field:'createdDt',title:'创建时间'},
        	]]
    	});
		
	});
	function handler() {
		switch(this.name) {
			case 'save': toSave();break;
		}
	}
	function toSave(){
		$.messager.progress({title:'系统提示',text:'数据处理中，请耐心等待...'});
		$.submit('#dataform',function(r) {
			$.messager.progress('close');
			if(r.code<0) return $alert(r.msg);
			top.$prompt('保存成功');
			top.$window.close(window,1,null);
		});
	}

</script>
<body>
	<div id="toolbar" class="toolbar" ></div>
	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',border:false">
			<form id="dataform" action="add" method="post">
				<table cellpadding="5" style="width:100%;">
					<tr>
						<td style="width:20%;">名称:</td>
						<td style="width:80%;">
							<input class="easyui-textbox" name="entity.name" data-options="required:true"/>
						</td>
					</tr>
					<tr>
						<td>栏目描述:</td>
						<td>
							<input class="easyui-textbox" name="entity.note" data-options="multiline:true" style="height:80px;width:100%;"/>
						</td>
					</tr>
				</table>
			</form>
		</div>
	</div>
</body>
</html>